using System;
using System.Globalization;
using System.Security.Principal;
using System.Web;

namespace Sedna.Core.Security
{
	/// <summary>
	/// Container class that holds Form based authentication ticket user data.
	/// Apart from a IPrincipal, an instance of the class holds a User's CultureInfo name
	/// and can be extended to hold something other.
	/// But please note, that because of the FormBased ticket user data size limitation
	/// (smth ~ 1K) too many data will cause malfunction that will turn out as an authentication failure.
	/// This is because the data that do not fit the size limit are cropped, hence cannot be restored
	/// within subsequent requests and a User is redirected to a login page every time.
	/// 
	/// To reduce data size, the recommended practice is to archive the serialized data with 
	/// some sort of 'ZIP' ( implementation <see cref="PrincipalCookieUtil"/>).
	/// </summary>
	/*[Serializable]
	public class FormAuthCookieUserData
	{
		private string cultureName;
        private string sessionID;
        private byte[] sign;
	    
		public FormAuthCookieUserData(SednaCookiePrincipal principal, CultureInfo culture)
		{
            sessionID = HttpContext.Current.Session.SessionID;
			this.Culture = culture;
		}		

		public CultureInfo Culture
		{
			get { return CultureInfo.CreateSpecificCulture(cultureName); }
			set { cultureName = value.Name; }
		}

	}*/
}
